import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: () => import('@/views/home.vue')
  },
  {
    path: '/cart',
    name: 'cart',
    component: () => import('@/views/cartPage.vue')
  },
  {
    path: '/search',
    name: 'search',
    component: () => import('@/views/search.vue')
  },
  {
    path: '/detail',
    name: 'detail',
    component: () => import('@/views/detail.vue')
  },
  {
    path: '/location',
    name: 'location',
    component: () => import('@/views/location.vue')
  },
  {
    path: '/mine',
    name: 'mine',
    component: () => import('@/views/mine.vue')
  },
  {
    path: '/category',
    name: 'category',
    component: () => import('@/views/category.vue')
  },
  {
    path: '/sort',
    name: 'sort',
    component: () => import('@/views/sort.vue')
  },
]

const router = new VueRouter({
  routes
})

export default router
